package com.arpa.wms.domain.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.arpa.wms.domain.entity.BasicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 任务中心 DTO
 * </p>
 *
 * @author LEO
 * @since 2020-08-03
 */
@Data
@ApiModel(value = "TaskDTO对象", description = "任务中心")
public class WmsTaskDTO extends BasicEntity {

    @ApiModelProperty(value = "任务号")
    private String code;

    @ApiModelProperty(value = "关联单号")
    private String sourceCode;


    @ApiModelProperty(value = "登录仓库授权该账号的货主集合")
    private List<String> shipmentCodes;

    @ApiModelProperty(value = "仓库标识")
    private String warehouseCode;

    @ApiModelProperty(value = "库位")
    private String location;

    @ApiModelProperty(value = "所属机构Code", hidden = true)
    private String groupCode;

    @ApiModelProperty(value = "任务类型：RECEIVE（收货）、PUTAWAY（上架）、PICKING（拣货）、CHECK（复核）、INVENTORY（盘点）、MOVE（移位）")
    private String taskType;

    @ApiModelProperty(value = "商品种数", hidden = true)
    private Integer goodsTypeQuantity;

    @ApiModelProperty(value = "商品种数上限")
    private Integer goodsTypeQuantityUp;

    @ApiModelProperty(value = "商品种数下限")
    private Integer goodsTypeQuantityLow;

    @ApiModelProperty(value = "商品件数", hidden = true)
    private BigDecimal goodsQuantity;

    @ApiModelProperty(value = "商品件数上限")
    private BigDecimal goodsQuantityUp;

    @ApiModelProperty(value = "商品件数下限")
    private BigDecimal goodsQuantityLow;

    @ApiModelProperty(value = "作业数量", hidden = true)
    private BigDecimal jobQuantity;
    @ApiModelProperty(value = "作业数量上限")
    private BigDecimal jobQuantityUp;
    @ApiModelProperty(value = "作业数量下限")
    private BigDecimal jobQuantityLow;

    @ApiModelProperty(value = "作业人姓名")
    private String operatorName;

    @ApiModelProperty(value = "作业人", hidden = true)
    private String operatorBy;

    @ApiModelProperty(value = "指派人姓名")
    private String assignName;

    @ApiModelProperty(value = "指派人", hidden = true)
    private String assignBy;

    @ApiModelProperty(hidden = true, value = "指派时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtAssign;

    @ApiModelProperty(value = "指派时间开始")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtAssignBegin;

    @ApiModelProperty(value = "指派时间结束")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtAssignStart;

    @ApiModelProperty(value = "状态:WAITING（待作业），WORKING（作业中），COMPLETED（作业完成）")
    private String jobStatus;

    @ApiModelProperty(value = "备注", hidden = true)
    private String remarks;

    @ApiModelProperty(value = "指派状态：0未指派，1已指派")
    private Integer assign;

    @ApiModelProperty(value = "收货状态", hidden = true)
    private String receiveStatus;

    @ApiModelProperty(value = "商品条码", hidden = true)
    private String goodsBarCode;

    @ApiModelProperty(value = "上架状态", hidden = true)
    private String putawayStatus;

    @ApiModelProperty(value = "第几页",required = true,example = "1")
    private Integer pageNum = 1;

    @ApiModelProperty(value = "每页条数",required = true,example = "18")
    private Integer pageSize = 10;

    @ApiModelProperty(value = "排序字段")
    private String sortField;

    @ApiModelProperty(value = "排序方式")
    private String sortType;

    @ApiModelProperty(value = "库位码，获取拣货单任务明细时可使用", hidden = true)
    private String locationName;

    @ApiModelProperty(value = "库位码模糊查询对应的多库位", hidden = true)
    private String locations;

    @ApiModelProperty(value = "sourceCode的status", hidden = true)
    private String status;

    @ApiModelProperty(value = "是否管理员操作；1：是，其他则不是；用于管理员查询任务列表指派未指派数据，区分普通用户时使用；")
    private Integer isAdmin;

    @ApiModelProperty(value = "订单标识")
    private String orderTag;


    @ApiModelProperty(value = "PDA已拣货明细查询时使用",hidden = true)
    private String goodsCode;
}
